/*
 * @(#)cn.design.pattern.responsibilitychain 2020/4/28/0028
 *
 * Copy Right@ 人人译视界
 */


package cn.design.pattern.responsibilitychain;

/**
 * <pre>
 * @author tuwei
 *
 * @version 0.9
 *
 * 修改版本: 0.9
 * 修改日期: 2020/4/28/0028
 * 修改人 :  tuwei
 * 修改说明: 初步完成
 * 复审人 ：
 * </pre>
 */
public class Client {
	public static void main(String[] args) {
		PurchaseRequest purchaseRequest = new PurchaseRequest(1, 31000, 1);
		// 创建相关的审批人
		DepartmentApprover departmentApprover = new DepartmentApprover("主任");
		CollegeApprover collegeApprover = new CollegeApprover("院长");
		ViceSchoolMasterApprover viceSchoolMasterApprover = new ViceSchoolMasterApprover("副校长");
		SchoolMasterApprover schoolMasterApprover = new SchoolMasterApprover("校长");
		departmentApprover.setNextApprover(collegeApprover);
		collegeApprover.setNextApprover(viceSchoolMasterApprover);
		viceSchoolMasterApprover.setNextApprover(schoolMasterApprover);
		departmentApprover.processRequest(purchaseRequest);
	}
}
